When a surface is machined by milling, casting components in metallic material or injection-moulding plastic components, for instance, burrs are formed at the edge of the surface, i.e. where the surface joins a second surface inclined in relation to said first surface. Previously burrs have been removed manually or by following the burr edge with a milling tool provided with a power sensor, the milling tool being pressed against the edge of the burr with a constant pressure in order to remove the burr. Performing manual deburring is a time-consuming operation and thus not cost efficient. Performing deburring with a milling tool provided with power sensor results either in the burrs remaining being too large, or in the edge being damaged, if the tolerance requirement is high.